﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zielonka.co.uk.extensions.system
{
    //  Description:	Repeats a character a given number of times, a little cleaner shortcut than using the string constructor.
    /*
       // write a line of 80 -'s to screen:
          Console.WriteLine('-'.Repeat(80));
     */

    public static partial class CharExtensions
    {
        /// <summary>
        /// Repeat the given char the specified number of times.
        /// </summary>
        /// <param name="input">The char to repeat.</param>
        /// <param name="count">The number of times to repeat the string.</param>
        /// <returns>The repeated char string.</returns>
        public static string Repeat(this char input, int count)
        {
            return new string(input, count);
        }
    }
}
